#include "StdAfx.h"
#include "ConfigManageEvent.h"

CConfigManageEvent::CConfigManageEvent(IConfigManage* pConfigManage):
m_pConfigManage(pConfigManage),
m_nNodeCount(0),
m_bLoadSuccessed(FALSE)
{
}

CConfigManageEvent::~CConfigManageEvent(void)
{
	vSetupVector.clear();
}

void CConfigManageEvent::OnDownloadConfigInfomationCallBack(BOOL bIsSuccessed,UINT nNodeCount)
{
	m_bLoadSuccessed = TRUE;
	m_nNodeCount = nNodeCount;
	int nTypeCount;
	if(m_pConfigManage)
		nTypeCount = m_pConfigManage->GetTypeCount();
	int i = 0;

}

void CConfigManageEvent::SetSetup()
{
	if(m_bLoadSuccessed == TRUE)
	{
		int nTypeCount = m_pConfigManage->GetTypeCount();
		for(int i = 0;i < nTypeCount;i++)
		{
			std::wstring strTypeName = m_pConfigManage->GetTypeName(i);
			UINT nShowNode = m_pConfigManage->GetShowNodeByTypeName(strTypeName.c_str());
		}
		for(int i = 0; i < m_nNodeCount;i++)
		{
			std::wstring strName =  m_pConfigManage->GetNodeAttribute(i,MATERIAL_NODE_ATTRIBUTE_NAME);
			std::wstring strID = m_pConfigManage->GetNodeAttribute(i,MATERIAL_NODE_ATTRIBUTE_ID);
			std::wstring strState = m_pConfigManage->GetNodeAttribute(i,MATERIAL_NODE_ATTRIBUTE_STATE);
			std::wstring strIco = m_pConfigManage->GetNodeAttribute(i,MATERIAL_NODE_ATTRIBUTE_ICO);
			
			//m_pConfigManage->SetupConfigInfomation(strID.c_str());
		}
	}
}
